﻿using System;
using WebFormsMvp.Contrib.Models;

namespace WebFormsMvp.Contrib.Views
{
    /// <summary>
    /// View implementation for Authentication
    /// </summary>
    public interface IAuthenticationView : ISubmittable<AuthenticationEventArgs>, IView<AuthenticationModel>
    {
    }

    /// <summary>
    /// Custom <see cref="System.EventArgs"/> for an Authentication event
    /// </summary>
    public class AuthenticationEventArgs : EventArgs
    {
        public AuthenticationEventArgs(string username, string password)
        {
            this.Username = username;
            this.Password = password;
        }

        /// <summary>
        /// Gets or sets the username.
        /// </summary>
        /// <value>The username.</value>
        public string Username { get; protected set; }
        /// <summary>
        /// Gets or sets the password.
        /// </summary>
        /// <value>The password.</value>
        public string Password { get; protected set; }
    }
}
